import * as type from './type'
import axios from 'axios'
import {fromJS} from "immutable";

export const Focus = () => ({
    type: type.FOCUS
})
export const getL = () => {
    return (disp) => {
        axios.get('/api/tt.json').then(res => {
            const data = res.data
            const action = {
                type: 'swl',
                data: fromJS(data),
                totalP: Math.ceil(data.length / 4)
            }
            disp(action)
        })
    }
}
export const Ss = () => ({
    type: 'ss'
})
